home *** CD-ROM | disk | FTP | other *** search
- on RstDemo
- global ChampsDemo
- set ChampsDemo to "beep 247 278 461 FIN 1177 337 32 "
- SetDcDemoRec(0)
- SetDcDemo(0)
- end
-
- on SetDcDemo AccuA
- global DcDemo
- set DcDemo to AccuA
- end
-
- on GestLanceDemo
- global DcDemo, CompteurDemo, AccuPosX, AccuPosY
- if DcDemo = 1 then
- exit
- end if
- if ((AccuPosX <> the mouseH) + (AccuPosY <> the mouseV)) <> 0 then
- return InitCompteurDemo()
- end if
- if soundBusy(1) then
- exit
- end if
- if CompteurDemo < the ticks then
- LanceDemo()
- end if
- end
-
- on InitCompteurDemo
- global CompteurDemo, AccuPosX, AccuPosY
- set CompteurDemo to the ticks + (3600 * 5)
- set AccuPosX to the mouseH
- set AccuPosY to the mouseV
- end
-
- on InitChampsDemo
- global ChampsDemo
- set Numero to random(8)
- set ChampsDemo to the text of field ("CastDemo" & string(Numero))
- end
-
- on LanceDemo
- global MemoDemo, MemoNavPuce, PosChDemo
- PlayClick()
- set MemoDemo to MemoNavPuce
- SetDcDemo(1)
- InitCastRollEff()
- InitChampsDemo()
- WaitDown()
- WaitTicks0(180)
- InitCastRollEff()
- set PosChDemo to 1
- SetVarDemo()
- end
-
- on GestDemo
- global DcDemo, DelayDemo, PosMouseX, PosMouseY, FlecheDemo, MacroDemo
- if DcDemo = 0 then
- exit
- end if
- cursor(0)
- if DelayDemo > the ticks then
- exit
- end if
- set AccuA to MacroDemo
- if AccuA <> "FIN" then
- SetVarDemo()
- do(AccuA)
- else
- FinDemo()
- InitCompteurDemo()
- LanceDemo()
- end if
- end
-
- on FinDemo
- global MemoDemo, MemoNavPuce
- SetDcDemo(0)
- FalseReste()
- InitCastRollEff()
- set MemoNavPuce to MemoDemo
- GoMovie(":NAVIG")
- end
-
- on InitFlecheDemo
- global FlecheDemo
- set FlecheDemo to the number of cast "FlecheDemo"
- PutEtatSprite(1, "48")
- PutVisibSprite(1, "48")
- set the ink of sprite 48 to 8
- AffFlecheDemo()
- end
-
- on AffFlecheDemo
- global DcDemo, CastEfface, PosXDemo, PosYDemo, FlecheDemo
- if DcDemo then
- set the locH of sprite 48 to PosXDemo
- set the locV of sprite 48 to PosYDemo
- SetNomCastSprite(48, FlecheDemo)
- cursor(0)
- updateStage()
- else
- set the locV of sprite 48 to 480
- SetCastSprite(48, CastEfface)
- cursor(-1)
- end if
- end
-
- on SetVarDemo
- global ChampsDemo, PosChDemo, MacroDemo, DelayDemo, PosXDemo, PosYDemo
- set MacroDemo to word PosChDemo + 0 of ChampsDemo
- set DelayDemo to value(word PosChDemo + 1 of ChampsDemo) + the ticks
- if PosChDemo = 1 then
- set PosXDemo to the mouseH
- set PosYDemo to the mouseV
- else
- set PosXDemo to value(word PosChDemo - 2 of ChampsDemo)
- set PosYDemo to value(word PosChDemo - 1 of ChampsDemo)
- end if
- set PosChDemo to PosChDemo + 4
- AffFlecheDemo()
- end
-
- on SetDcDemoRec AccuA
- global DcDemoRec
- set DcDemoRec to AccuA
- end
-
- on GestDemoRec AccuA
- global DcDemoRec, ChampsDemo, DelayDemo, DebMacRec, FinMacRec
- if DcDemoRec = 0 then
- exit
- end if
- set DebMacRec to length(ChampsDemo) + 1
- set ChampsDemo to ChampsDemo & AccuA & " "
- set FinMacRec to length(ChampsDemo) - 1
- set ChampsDemo to ChampsDemo & string(the ticks - DelayDemo) & " "
- set ChampsDemo to ChampsDemo & string(the mouseH) & " "
- set ChampsDemo to ChampsDemo & string(the mouseV) & " "
- set DelayDemo to the ticks
- end
-
- on CorParaDemRec NomMacro
- global ChampsDemo, DebMacRec, FinMacRec
- set AccuA to chars(ChampsDemo, 1, DebMacRec - 1)
- set AccuB to chars(ChampsDemo, FinMacRec + 1, length(ChampsDemo))
- set ChampsDemo to AccuA & " " & NomMacro & " "
- set FinMacRec to length(ChampsDemo) - 1
- set ChampsDemo to ChampsDemo & AccuB
- end
-
- on SetRecord
- global ChampsDemo, DelayDemo, DcDemoRec
- if DcDemoRec = 0 then
- set ChampsDemo to EMPTY
- set DelayDemo to the ticks
- SetDcDemoRec(1)
- else
- GestDemoRec("FIN")
- SetDcDemoRec(0)
- end if
- InitCastRollEff()
- WaitDown()
- end
-